<%= form_for(@entity, :url => [@create,Entity], :html => {:multipart => true, :title => "new user form"}) do |f| %>
	<% if @entity.errors.any? %>
		<div id="error_explanation">
		  <h2><%= pluralize(@entity.errors.count, "error") %> prohibited this entity from being saved:</h2>
	
		  <ul>
		  <% @entity.errors.full_messages.each do |msg| %>
			<li><%= msg %></li>
		  <% end %>
		  </ul>
		</div>
	<% end %>  
	
	<p>* Fields marked with an asterisk are compulsory</p>
	<div class="field">
		<%= f.label(:name, "Name *") %></br>
		<%= f.text_field(:name, :placeholder => "Enter name", :title => "compulsory name field") %>
	</div></br>	
	<% if (session[:user_id].nil?) %>
		<div class="field">
			<%= f.label(:email,"Email *") %></br>
			<%= f.email_field(:email, :title => "compulsory email field") %>
		</div></br>
		<div class="field">
			<%= f.label(:password,"Password *") %></br>
			<%= f.password_field(:password, :title => "compulsory password field")%>
		</div></br>
		<div class="field">
			<%= f.label(:password_confirmation,"Confirmation *") %></br>
			<%= f.password_field(:password_confirmation, :title => "compulsory password confirmation field") %>
		</div></br> 
	<% else %>
		<div class="field">
			<%= f.radio_button(:introverted, true, :title => "select introverted option") %>
			<%= f.label(:introverted,"Introverted") %>
			<%= f.radio_button(:introverted, false, :title => "select extraverted option", :checked=> true) %>
			<%= f.label(:introverted,"Extraverted") %>			
		</div></br> 
	<% end %>
	<div class="field">
		<%= f.label(:tagline,"Tagline") %></br>
		<%= f.text_field(:tagline, :placeholder => "Enter tagline", :title => "optional tagline field") %>
	</div></br>
	<div class="field">
		<%= f.label(:description,"Description") %></br>
		<%= f.text_area(:description, :placeholder => "A brief description.", :title => "optional description field") %>
	</div></br>
	 <div class="field">
		<%= f.label(:audio_welcome,"Audio welcome") %></br>
		<%= f.file_field(:audio_welcome, :title => "optional audio welcome field") %>
	</div></br>
	
	<div class="actions">
		<%= f.submit(:value => 'Create', :title => 'Create') %>
	</div>
<% end %>

